package com.swind.fast.modules.app.halali.partner.component;

import java.net.URL;
import java.io.InputStream;
import javax.servlet.http.HttpServletRequest;

import com.swind.fast.common.util.oConvertUtils;

import org.springframework.stereotype.Component;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import com.swind.fast.modules.app.halali.partner.vo.response.HomeResponse;
import com.swind.fast.modules.app.halali.partner.entity.RestaurantMeal;
import com.swind.fast.modules.app.halali.partner.service.IRestaurantMealService;

import com.swind.fast.modules.app.halali.partner.entity.RestaurantCategory;
import com.swind.fast.modules.app.halali.partner.service.IRestaurantCategoryService;

import com.swind.fast.modules.app.halali.partner.entity.MealCategory;
import com.swind.fast.modules.app.halali.partner.service.IMealCategoryService;
import com.swind.fast.modules.app.halali.partner.entity.RestaurantMealDeal;
import com.swind.fast.modules.app.halali.partner.service.IRestaurantMealDealService;
import com.swind.fast.modules.app.halali.partner.entity.Restaurant;
import com.swind.fast.modules.app.halali.partner.service.IRestaurantService;

import org.springframework.context.ApplicationContext;

import com.swind.fast.common.system.util.JwtUtil;

import cn.hutool.core.date.DateBetween;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DateTime;

import com.swind.fast.common.system.vo.DictModel;
import com.swind.fast.modules.system.service.ISysDictService;

import lombok.extern.slf4j.Slf4j;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;

import org.apache.shiro.SecurityUtils;
import com.swind.fast.common.system.vo.HalaliLoginUser;

@Slf4j
@Component
public class HalaliContext {
    @Autowired
    private ApplicationContext applicationContext;

    @Autowired
    private IMealCategoryService mealCategoryService;

    @Autowired
    private IRestaurantMealDealService mealDealService;

    @Autowired
    private IRestaurantService restaurantService;

    @Autowired
    private IRestaurantCategoryService restaurantCategoryService;

    @Autowired
    private IRestaurantMealService mealService;

    @Autowired
    private ISysDictService sysDictService;

    public static String getRestaurntId() {
        HalaliLoginUser sysUser = (HalaliLoginUser) SecurityUtils.getSubject().getPrincipal();
        String id = sysUser.getRestaurantId();
        return id;
    }
}